//
//  LongTagView.h
//  CoachsBook
//
//  Created by huiyong li on 2022/8/20.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@protocol LongTagViewDelegate <NSObject>
- (void)DeleteWithTagViewTitle:(NSString *)titile WhitTag:(NSInteger)tag;
- (void)DeleteWithTagViewTitleArr:(NSArray *)titilearr;
- (void)getViewHeight:(CGFloat)height;
@end



@interface LongTagView : UIView

/**
 *  初始化
 *
 *  @param frame    frame
 *  @param tagArray 标签数组
 *
 */
- (instancetype)initWithFrame:(CGRect)frame tagArray:(NSMutableArray*)tagArray;

// 标签数组
@property (nonatomic,retain) NSArray* tagArray;
@property (nonatomic,strong) UILabel *titleLabel;
@property (nonatomic,strong) UIButton *deleteBut;
@property (nonatomic,assign) BOOL multiselect;  //是否多选
@property (nonatomic,assign) NSInteger maxnumber;  //多选下最大选择多少
@property (nonatomic,assign) BOOL automaticWidth;  //是否自适应宽度
@property (nonatomic,assign) NSInteger widthNumber;  //不自适应宽度下每行显示几个tag
@property (nonatomic, weak) id<LongTagViewDelegate>Delegate;

// 默认标签文字颜色
@property (nonatomic,retain) UIColor* textColorNormal;

// 默认标签背景颜色
@property (nonatomic,retain) UIColor* backgroundColorNormal;


// 选中标签文字颜色
@property (nonatomic,retain) UIColor* textColorSelected;

// 选中标签背景颜色
@property (nonatomic,retain) UIColor* backgroundColorSelected;


// 默认标签文字字体
@property (nonatomic,retain) UIFont* textFontNormal;

//默认按钮高度
@property (nonatomic,assign) CGFloat btnH;


//选中按钮的tag
@property (nonatomic,assign) NSInteger btntag;
@end

NS_ASSUME_NONNULL_END
